//-----------------------------------------------------
// applicationState.h
//-----------------------------------------------------

/**
 * @file applicationState.h
 *
 * Class that represents a state of the application
 *
 * @see application::CApplicationState
 * @see application::CApplication
 *
 */

#pragma once;

#include "application.h"

namespace application {

	class CApplicationState {

	protected:

		CApplication *_app;		// Application this state belongs to
		
	public:
		
		// Class constructor
		CApplicationState(CApplication *app) : _app(app) {}

		// Class destructor
		virtual ~CApplicationState();

		// Function called on state creation
		virtual void onCreate();

		// Function called on state destruction
		virtual void onDestroy();

		// Function called on state activation
		virtual void onActivate();

		// Function called on state deactivation
		virtual void onDeactivate();

		// Function encapsulating the state function
		virtual void onRun();

	};

} // namespace application